package demo14;

import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Manager qunZhu = new Manager("猫猫头"); // 群主
        qunZhu.setMoney(new Scanner(System.in).nextDouble()); // 输入群主的存款，nextDouble接收double值
        Member qunYou1 = new Member("小玉", 0);
        Member qunYou2 = new Member("小丸子", 10);
        Member qunYou3 = new Member("大脸猫", 20);

        ArrayList<Double> arrayList = qunZhu.sendMoney(100, 3);
        qunZhu.showMoney(); // 群主信息

        qunYou1.receiveMoney(arrayList);
        qunYou2.receiveMoney(arrayList);
        qunYou3.receiveMoney(arrayList);
        qunYou1.showMoney(); // 群友信息
        qunYou2.showMoney();
        qunYou3.showMoney();
    }
}
